package org.spcloud.service.order.service.impl;

import org.spcloud.service.order.config.message.MessageBinding;
import org.spcloud.service.order.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.stereotype.Service;
@Service
public class MessageServiceImpl implements MessageService {

	@Autowired
	MessageBinding messageBinding;
	
	@Override
	public boolean send(String msg) {

		return messageBinding.smsSenderOrder().send(
				MessageBuilder.withPayload(msg).build()
				);
	}

}
